/*
 * @Author: your name
 * @Date: 2021-04-07 15:47:47
 * @LastEditTime: 2021-07-06 16:33:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dolphin-data-center-front-end\babel.config.js
 */
const IS_PROD = ['production'].includes(process.env.NODE_ENV)

const plugins = [
  '@babel/plugin-proposal-optional-chaining', // 可选链 ?.
  '@babel/plugin-proposal-nullish-coalescing-operator', // 空值合并 ??
]
if (IS_PROD) {
  plugins.push('transform-remove-console')
}

module.exports = {
  presets: ['@vue/cli-plugin-babel/preset'],
  plugins,
}
